define(['app'], function(app) {
	'use strict';

	var controller = function controller($scope, Save,$stateParams) {

		//新品广告活动的详细-接受参数
		$scope.drawModel = new Object();
		$scope.drawModel.act_id =$stateParams.act_id;
		$scope.drawModel.draw_type = 1;
		$scope.drawModel.num = "";
		
		$scope.sui=function(index){
			$scope.drawModel.draw_type = index;
			console.log($scope.drawModel.draw_type);
		}
		
		$scope.init_draw = function() {
			Save.draw($scope.drawModel.act_id,$scope.drawModel.draw_type,function(data) {
				$scope.draw = data;
			});
		}
		//数据加载
		$scope.init_data=function(){
		    Save.show_getlist($scope.drawModel.act_id,function(data){
		        $scope.show_user=data;
		    });
		}
		$scope.init_data();

	}

	controller.$inject = ['$scope', 'Save','$stateParams'];

	return app.registerController("savectrl",controller);
});